﻿
using NurseStation.common;
using NurseStation.views;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Prism.Events;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Unity;
using Prism.Mvvm;
using Prism.Commands;
using Prism.Regions;

namespace NurseStation.viewmodels
{
    public class MainViewModel: VmBase
    {

        #region 事件
        /// <summary>
        /// 点击保存
        /// </summary>
        public DelegateCommand<object> SaveCommand { get; private set; }

     
        #endregion

        /// <summary>
        /// 构造
        /// </summary>
        public MainViewModel(IContainerExtension container, IEventAggregator eventAggregator, IRegionManager regionManager) : base(container, eventAggregator, regionManager)
        {
            SaveCommand = new DelegateCommand<object>(OnSave);
            regionManager.RegisterViewWithRegion(RegionNames.ShellMainRegionName,typeof(BatchVitalSignView));
        }


        private string _SerachText;
        /// <summary>
        /// 搜索文本
        /// </summary>
        public string SerachText
        {
            get { return _SerachText; }
            set
            {
                _SerachText = value;
                RaisePropertyChanged(nameof(SerachText));
            }
        }

        /// <summary>
        /// 点击保存
        /// </summary>
        public void OnSave(object o) 
        {
            MessageBox.Show("点击了保存");
        }
    }
}
